/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.emergency.plan.entity;

import com.hopes.bizz.emergency.common.constant.enums.ParkEmergencySysDictEnum;
import com.baomidou.mybatisplus.annotation.*;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.common.entity.BaseEntity;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDate;

/**
 * 园区应急预案
 *
 * @author cx
 * @date 2023-10-23 18:41:39
 */
@Data
@TableName(value = "er_park_emergency_plan")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "园区应急预案")
public class EmergencyParkPlanEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 预案编号
	*/
    @Schema(description="预案编号")
    private String planNo;

	/**
	* 预案名称
	*/
    @Schema(description="预案名称")
    private String planName;

	/**
	* 预案级别
	*/
    @Schema(description="预案级别")
    private Integer planLevel;

	/**
	* 预案类型
	*/
    @Schema(description="预案类型")
    private Integer planType;

	/**
	* 版本
	*/
    @Schema(description="版本")
    private String version;

	/**
	* 行业类型
	*/
    @Schema(description="行业类型")
    private Integer industryType;

	/**
	* 编制单位
	*/
    @Schema(description="编制单位")
    private String establishmentUnit;

	/**
	* 生效日期
	*/
    @Schema(description="生效日期")
    private LocalDate effectiveDate;

	/**
	* 发布时间
	*/
    @Schema(description="发布时间")
    private LocalDate releaseDate;

	/**
	* 涉及职责
	*/
    @Schema(description="涉及职责")
    private String involvedDuties;

	/**
	* 预案描述
	*/
    @Schema(description="预案内容")
    private String contentDesc;

	/**
	 * 预备内容
	 */
	@Schema(description="预备内容")
	private String prepareContent;


	/**
	* 状态
	*/
    @Schema(description="状态")
    private Integer status;

	/**
	 * 审核意见
	 */
	@Schema(description="审核意见")
	private String auditOpinion;

	/**
	 * 机构ID
	 */
	@Schema(description="机构ID")
	private Long orgId;


	public String getPlanLevelStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_plan_level, this.getPlanLevel());
	}
	public String getPlanTypeStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_plan_type, this.getPlanType());
	}
	public String getIndustryTypeStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_industry_type, this.getIndustryType());
	}
	public String getStatusStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_status, this.getStatus());
	}

	public String getEstablishmentUnitStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_compilation_org, this.getEstablishmentUnit());
	}

}